package com.cpx.service;

import com.cpx.dto.MenuDto;
import com.cpx.dto.ShiroAuthoDto;
import com.cpx.po.Employee;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @Auther: PanBin
 * @Date: 2018-9-5 14:44
 * @Description: 用户的业务层接口
 * @Version: 1.0
 */
@RequestMapping("/employee")
public interface EmployeeService extends BaseService<Employee> {

    /**
     * @Author: PanBin
     * @Description: 通过用户名查询用户
     * @CreateDate: 2018-9-5 15:10
     * @Param [username]
     * @Return com.cpx.po.CpxUser
     */
    @RequestMapping(value = "/findEmployeeByUsername",method = RequestMethod.POST)
    Employee findEmployeeByUsername(String username);

    /**
     * @Author: PanBin
     * @Description: 通过用户id获取用户的shiro权限数据
     * @CreateDate: 2018-9-10 10:38
     * @Param [id：用户id]
     * @Return com.cpx.dto.ShiroAuthoDto
     */
    @RequestMapping(value = "/getAuthcListByEmployeeId",method = RequestMethod.POST)
    ShiroAuthoDto getAuthcListByEmployeeId(Integer id);

    /**
     * @Author: PanBin
     * @Description: 获取用户的权限菜单列表
     * @CreateDate: 2018-11-7 15:53
     * @Param [userId: 用户id]
     * @Return java.util.List<com.cpx.po.CpxResource>
     */
    @RequestMapping(value = "/getMenuByEmployeeId",method = RequestMethod.POST)
    List<MenuDto> getMenuByEmployeeId(Integer employeeId);
}
